package com.edu.study.base.needfieldMetadata.service.impl;

import com.edu.study.base.needfieldMetadata.domain.TbNeedfieldMetadataRy;
import com.edu.study.base.needfieldMetadata.mapper.TbNeedfieldMetadataRyMapper;
import com.edu.study.base.needfieldMetadata.service.ITbNeedfieldMetadataRyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 显示项配置Service业务层处理
 *
 * @author jjt
 * @date 2021-03-11
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class TbNeedfieldMetadataRyServiceImpl implements ITbNeedfieldMetadataRyService
{
    @Autowired
    private TbNeedfieldMetadataRyMapper tbNeedfieldMetadataRyMapper;

    /**
     * 查询显示项配置
     *
     * @param id 显示项配置ID
     * @return 显示项配置
     */
    @Override
    public TbNeedfieldMetadataRy selectTbNeedfieldMetadataRyById(String id)
    {
        return tbNeedfieldMetadataRyMapper.selectTbNeedfieldMetadataRyById(id);
    }

    /**
     * 查询显示项配置列表
     *
     * @param tbNeedfieldMetadataRy 显示项配置
     * @return 显示项配置
     */
    @Override
    public List<TbNeedfieldMetadataRy> selectTbNeedfieldMetadataRyList(TbNeedfieldMetadataRy tbNeedfieldMetadataRy)
    {
        return tbNeedfieldMetadataRyMapper.selectTbNeedfieldMetadataRyList(tbNeedfieldMetadataRy);
    }

    /**
     * 新增显示项配置
     *
     * @param tbNeedfieldMetadataRy 显示项配置
     * @return 结果
     */
    @Override
    public int insertTbNeedfieldMetadataRy(TbNeedfieldMetadataRy tbNeedfieldMetadataRy)
    {
        return tbNeedfieldMetadataRyMapper.insertTbNeedfieldMetadataRy(tbNeedfieldMetadataRy);
    }

    /**
     * 修改显示项配置
     *
     * @param tbNeedfieldMetadataRy 显示项配置
     * @return 结果
     */
    @Override
    public int updateTbNeedfieldMetadataRy(TbNeedfieldMetadataRy tbNeedfieldMetadataRy)
    {
        return tbNeedfieldMetadataRyMapper.updateTbNeedfieldMetadataRy(tbNeedfieldMetadataRy);
    }

    @Override
    public int updateTbNeedfieldMetadata(TbNeedfieldMetadataRy tbNeedfieldMetadataRy)
    {
        return tbNeedfieldMetadataRyMapper.updateTbNeedfieldMetadata(tbNeedfieldMetadataRy);
    }

    /**
     * 批量删除显示项配置
     *
     * @param ids 需要删除的显示项配置ID
     * @return 结果
     */
    @Override
    public int deleteTbNeedfieldMetadataRyByIds(String[] ids)
    {
        return tbNeedfieldMetadataRyMapper.deleteTbNeedfieldMetadataRyByIds(ids);
    }

    /**
     * 删除显示项配置信息
     *
     * @param id 显示项配置ID
     * @return 结果
     */
    @Override
    public int deleteTbNeedfieldMetadataRyById(String id)
    {
        return tbNeedfieldMetadataRyMapper.deleteTbNeedfieldMetadataRyById(id);
    }
}
